<extend name="Public/main" />
<block name="body">
	<div class="wrap J_check_wrap">
		<div class="nav">
			<ul class="cc">
				<li class="current"><a href="{:U('user/index')}">管理员</a></li>
				<li><a href="{:U('user/add')}">添加管理员</a></li>
			</ul>
		</div>
		<div class="table_list">
			<table width="100%" cellspacing="0">
				<thead>
					<tr>
						<td width="10%">序号</td>
						<td width="10%" align="left" >用户名</td>
						<td width="10%" align="left" >所属角色</td>
						<td width="10%"  align="left" >最后登录IP</td>
						<td width="10%"  align="left" >最后登录时间</td>
						<td width="15%"  align="left" >E-mail</td>
						<td width="20%">备注</td>
						<td width="15%" >管理操作</td>
					</tr>
				</thead>
				<tbody>
				<foreach name="users" item="vo">
					<tr>
						<td width="10%" align="center">{$vo.ID}</td>
						<td width="10%" >{$vo.user_login}</td>
						<td width="10%" >{$roles[$vo[role_id]]['name']}</td>
						<td width="10%" >{$vo.last_login_ip}</td>
						<td width="10%"  >
					<if condition="$vo['last_login_time'] eq 0">
						该用户还没登陆过
						<else />
						{$vo.last_login_time}
					</if>
					</td>
					<td width="15%">{$vo.user_email}</td>
					<td width="20%"  align="center">{$vo.remark}</td>
					<td width="15%"  align="center">
					<if condition="$User['username'] eq $vo['username']">
						<font color="#cccccc">修改</font> | 
						<font color="#cccccc">删除</font>
						<else />
						<a href="{:U("Management/edit",array("id"=>$vo[id]))}">修改</a> | 
						<a class="J_ajax_del" href="{:U('Management/delete',array('id'=>$vo['id']))}">删除</a>
					</if>
					</td>
					</tr>
				</foreach>
				</tbody>
			</table>
		</div>
	</div>
</block>